#########################
#   Author : Leon yu    #
#   Date : 2025/06/04   #
#   Id : SM2772         #
#########################
from datetime import datetime
from dbResps.querySalesItemReport import *
from apiRespsAnalyze.querySalesItemReportFromApi import *
from compareResult.compareUtils import Compare

# 非当天 6/12号
startTime = 1718125200000
endTime = 1718211599000


getQuerySalesItemReportFromApi_Result = querySalesItemReportResult(startTime, endTime)  # 毛利率不知道怎么取，暂忽略
getQuerySalesItemReportFromDB_Result = getQuerySalesItemReportFromDB(startTime, endTime)    # 毛利率不知道怎么取，暂忽略


if __name__ == "__main__":
    compareResult = Compare.compare(getQuerySalesItemReportFromDB_Result, getQuerySalesItemReportFromApi_Result)
    if compareResult:
        print('compare success')
    else:
        print('compare fail')
        print(getQuerySalesItemReportFromDB_Result)
        print(getQuerySalesItemReportFromApi_Result)